/*
输入 输入差分，输出 输出差分
 */
package main

import (
	"AES/change"
	"AES/generate"
)

// p1, p2 为输入的明密文对。 differ_out 为经过一轮变换后的 16 个字节的差分
func Expand(p1 *[][]byte, p2 *[][]byte) (differ_out [][]byte) {
	differ_in := make([][]byte, 4)
	for i := 0; i < 4; i++ {
		differ_in[i] = make([]byte, 4)
	}
	for i := 0; i < 4; i++ {
		for j := 0; j < 4; j++ {
			differ_in[i][j] = generate.S_Change((*p1)[i][j]) ^ generate.S_Change((*p2)[i][j])
		}
	}
	differ_out = change.Row_Change(&differ_in)
	differ_out = change.Col_Change(&differ_out)
	return differ_out
}

func main() {

}
